package com.lifeng.patterns.factory.factoryMethod;

import com.lifeng.patterns.factory.simpleFactory.INoodles;

/**
 * Created by lifeng on 2019/9/18.
 */
public class TestMain1 {
    public static void main(String[] args) {
        //比如你想吃兰州拉面,可以到兰州专卖店
        INoodlesFactory noodlesFactory = new LanZhouNoodlesFactory();
        INoodles noodles = noodlesFactory.create();
        noodles.desc();

        //比如你想吃山西刀削面,可以到专卖店
        noodlesFactory = new DaoXiaoNoodlesFactory();
        noodles = noodlesFactory.create();
        noodles.desc();
    }
}
